<?php
if(!isset($param[0]))throw new Exception('Not enough parameter');

if(!isset($state['table']))throw new Exception('Select table first');

$e=$table->getById($param[0]);
if(!$e)throw new Exception('Record does not exist');
$state['record_id']=$param[0];
echo "Record selected";
